<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!-- 模态框（Modal） -->
<div class="modal fade" id="Edit" tabindex="-1" role="dialog"
	aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
		<form action="departmentSave" method="post" id="departmentForm">
		<input type="hidden" name="status" value="1"/>
			<input type="hidden" name="id" id="departmentId" value="0"/>
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"
					aria-hidden="true">&times;</button>
				<h4 class="modal-title" id="myModalLabel">新增部门</h4>
			</div>
			<div class="modal-body">
			
				<p>
					部门名称:<input type="text" name="name"  id="departmentName"/>
				</p>
				<p>
					部门描述:<input type="text" name="description" id="departmentDescription" />
				</p>
				<p>
					部门电话:<input type="text" name="phone" id="departmentPhone"/>
				</p>				
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭
				</button>
				<button type="submit" class="btn btn-primary">提交</button>
			</div>
			</form>
		</div>
	</div>
</div>
<!-- 密码重置框 -->
<script>
</script>
<div class="modal fade" id="repassowrd" tabindex="-1" role="dialog"
	aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"
					aria-hidden="true">&times;</button>
				<h4 class="modal-title" id="myModalLabel">密码重置</h4>
			</div>
			<div class="modal-body">
				<form id="defaultForm" method="post" action="validators.html">
					<div class="form-group">
						<label>密码</label>
						<div class="col-sm-5">
							<input type="password" class="form-control" name="password" />
						</div>
					</div>
					<div class="form-group">
						<label>确认密码</label>
						<div class="col-sm-5">
							<input type="password" class="form-control"
								name="confirmPassword" />
						</div>
					</div>
				</form>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>

		</div>
	</div>
</div>
<!-- 密码重置框 -->
<!-- 修改密码 模态框（Modal） -->
<div class="modal fade" id="password-edit" tabindex="-1" role="dialog"
	aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"
					aria-hidden="true">&times;</button>
				<h4 class="modal-title" id="myModalLabel">用户密码修改</h4>
			</div>
			<form action="password-edit" method="post" id="password-edit">
			<div class="modal-body">
				<input type="hidden" name="id" value="${sessionScope.employee.getId()}"/>
				<table class="table">			
					<tr>
						<td>员工编号：</td>
						<td><input type="text" value="${sessionScope.employee.getNr()}" readonly="readonly"/></td>
					</tr>
					<tr>
						<td>原密码：</td>
						<td><input type="text" name="passwordPre" id="passwordPre" /></td>
					</tr>
					<tr>
						<td>设置密码：</td>
						<td><input type="text" name="password" id="password"/></td>
					</tr>
					<tr>
						<td>确认密码：</td>
						<td><input type="text" name="passwordConfirm" id="passwordConfirm"/></td>
					</tr>
				</table>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				<button type="submit" class="btn btn-primary">提交更改</button>
			</div>
			</form>
		</div>
		<!-- /.modal-content -->
	</div>
</div>
	<!-- /.modal -->
	
<script type="text/javascript">
	$(function() {
		$("#password-edit").validate({
			rules:{
				passwordPre:{required:true},
				password:{required:true},
				passwordConfirm:{required:true}
			}
		});
	})
</script>
